from django.conf.urls.defaults import *
from django.contrib.syndication.views import feed as feed_view
from django.views.generic.list_detail import object_detail as detail_view
from django.views.generic.list_detail import object_list as list_view
from pyplog.artists.models import Artist

urlpatterns = patterns("",
	url(
		r"^$",
		list_view,
		{
			"queryset" : Artist.objects.filter(included_in_index = True).order_by("profession", "last_name"),
			"extra_context" : {
				"page_title" : "Artists",
			},
			"template_name" : "artists/artist_list.html",
			"template_object_name" : "artist",
		},
		name = "artist-index",
	),
	url(
		r"^(?P<slug>.*)$",
		detail_view,
		{
			"queryset" : Artist.objects.order_by("profession", "last_name"),
			"template_name" : "artists/artist_detail.html",
			"template_object_name" : "artist",
		},
		name = "artist-detail",
	),
)
